#include <QApplication>
#include <QDesktopWidget>
#include "mainwindow.h"
#include <InitForm/initwidget.h>
#include <Action/actionform.h>


int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QString appPath = a.applicationDirPath();
    QTranslator transQt;
    transQt.load("qt_zh_CN", appPath);
    a.installTranslator(&transQt);
    QTranslator transDI;
    transDI.load("TC_MDV_zh_CN", appPath);
    a.installTranslator(&transDI);

    InitWidget w;
    w.hide();

    ActionForm s;

//    s.setCompanyName(QStringLiteral(""));
//    s.setSoftName(QStringLiteral("--"));
//    s.setSoftVersion(QStringLiteral("Beta v1.1"));
//    s.setCompanyInfo(QStringLiteral(" @2020-2022"));
    s.show();



    QObject::connect(&s,&ActionForm::done,&w,&InitWidget::show);


    MainWindow m;

    w.addWidget(&m);

    QObject::connect(&w,&InitWidget::appQuit,&m,&MainWindow::appQuit);
    QObject::connect(&s,&ActionForm::appQuit,&m,&MainWindow::appQuit);


    return a.exec();

}
